package newsrecommendation.utils;

import java.text.Normalizer;

/**
 *
 * @author Andrea
 */
public class StringUtils {
    public static String preprocess(String string) {
        string = string.toLowerCase();
        string = string.replace(" ", "");
        string = Normalizer.normalize(string, Normalizer.Form.NFD);
        string = string.replaceAll("[^\\p{ASCII}]", "");
        string = string.trim();
        return string;
    }
}
